package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.entity.SysVerification;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanValidators;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserPost;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.mapper.*;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.ISysVerificationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;

import javax.validation.Validator;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 第三方验证 业务层处理
 *
 * @author ruoyi
 */
@Service
public class SysVerificationServiceImpl implements ISysVerificationService {
    private static final Logger log = LoggerFactory.getLogger(SysVerificationServiceImpl.class);

    @Autowired
    private SysVerificationMapper sysVerificationMapper;


    /**
     * 修改保存用户信息
     *
     * @param sysVerification 第三方验证
     * @return 结果
     */
    @Override
    @Transactional
    public int updateVerification(SysVerification sysVerification) {
        return sysVerificationMapper.updateVerification(sysVerification);
    }

    /**
     * 修改保存用户信息
     *
     * @return 结果
     */
    @Override
    @Transactional
    public SysVerification selectVerification() {
        return sysVerificationMapper.selectVerification();
    }


}
